package com.waimai.mobile.api.model;

import java.io.Serializable;

public class ResponseStatus implements Serializable{
	
	private int statusCode;
	private String msg;
	
	public int getStatusCode() {
		return statusCode;
	}
	
	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}


	public void setStatusCode(int statusCode) {
		this.statusCode = statusCode;
	}

	public ResponseStatus(){}
	
	public ResponseStatus(int statusCode) {
		super();
		this.statusCode = statusCode;
		
		switch (statusCode) {
		case ResponseModel.STATUS_SERVER_ERROR:
			msg = "服务器错误";
			break;
		case ResponseModel.STATUS_REQUEST_SUCCESS:
			msg = "请求成功";
			break;
		case ResponseModel.STATUS_REQUEST_FAILED:
			msg = "请求失败";
			break;
		case ResponseModel.STATUS_LOGIN_SUCCESS:
			msg = "登陆成功";
			break;
		case ResponseModel.STATUS_LOGIN_FAILED:
			msg = "登陆失败";
			break;
		case ResponseModel.STATUS_REGIST_PHONE_AVALIABLE:
			msg = "手机号码可用";
			break;
		case ResponseModel.STATUS_REGIST_PHONE_EXTIST:
			msg = "手机号码已存在";
			break;
		case ResponseModel.STATUS_REGIST_SUCCESS:
			msg = "注册成功";
			break;
		case ResponseModel.STATUS_REGIST_FAILED:
			msg = "注册失败";
			break;
		case ResponseModel.STATUS_GET_DATA_SUCCESS:
			msg = "获取数据成功";
			break;
		case ResponseModel.STATUS_GET_DATA_NONE:
			msg = "获取到的数据为0";
			break;
		case ResponseModel.STATUS_CHECK_PASSED:
			msg = "验证通过";
			break;
		case ResponseModel.STATUS_CHECK_NOT_EXTIST:
			msg = "验证 数据不存在";
			break;
		case ResponseModel.STATUS_CHECK_NOT_PASSED:
			msg = "验证不通过";
			break;
		}
	}

	@Override
	public String toString() {
		return "Status [statusCode=" + statusCode + ", msg=" + msg + "]";
	}
}
